const http = uni.$u.http
import { baseUrl } from '@/utils/config.js'

const api = {
	all: '/live/all',
	list: '/live/list',
	categories: '/live/categories',
	subCates: '/live/subCates',
	view: '/live/view',
}

export const view = (config) => http.get(api.view, {
	custom: {
		loading: false,
		toast: false
	},
	
	...config
})

export const subCates = (config) => http.get(api.subCates, {
	custom: {
		toast: false
	},
	
	...config
})

export const categories = (config) => http.get(api.categories, {
	custom: {
		toast: false
	},
	
	...config
})

export const all = (config) => http.get(api.all, {
	custom: {
		toast: false
	},
	
	...config
})

export const list = (config) => http.get(api.list, {
	custom: {
		toast: false
	},
	
	...config
})